package com.class3;

import web.GetMsg;

public class ModifyAddr {
    public static void main(String[] args) throws InterruptedException {
        GetMsg msg=new GetMsg();
        msg.openBrowser("chrome");
        Thread.sleep(3000);
        msg.visitPage("http://www.testingedu.com.cn:8000");
        msg.clickButton("//*[text()='登录']");
        Thread.sleep(3000);
        msg.sendKeys("//input[@name='username']","1361051227@qq.com");
        msg.sendKeys("//input[@name='password']","msg1-12345");
        msg.sendKeys("","msg1-12345");
        msg.sendKeys("//input[@name='verify_code']","msge");
        msg.clickButton("//*[@name='sbtbutton']");
        Thread.sleep(4000);
        msg.clickButton("//*[text()='修改']");
        //
        String xp="//div/input[@name='consignee']";
        msg.clearMsg(xp);
        msg.sendKeys(xp,"上海市浦东新区川沙新镇");
        String xp1="//div/input[@name='mobile']";
        msg.clearMsg(xp1);
        msg.sendKeys(xp1,"0556-2461877");
        msg.selectItems("//select[@id='province']",3);
        Thread.sleep(5000);
        msg.clickButton("//select[@id='city']");
        msg.selectItems("//select[@id='city']","936");
        Thread.sleep(3000);
        msg.clickButton("//select[@id='district']");
        msg.selectItems("//select[@id='district']","937");
        String xp2="//input[@name='address']";
        msg.sendKeys(xp2,"门牌号地址");
        msg.sendKeys(xp2,"246600");
        msg.clickButton("//a[@id='address_submit']");
    }
}
